﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SGRapidForm.Permission.Service.Interface;
using SGRapidForm.Permission.Entity;
using SGRapidForm.Permission.Component;
using System.Collections.Specialized;
using SGRapidForm.Common;

namespace SGRapidForm.Permission.Service
{
    public partial class PermissionService : IPermissionService
    {
        private RoleButtonComponent _roleButtonComponent;
        public RoleButtonComponent RoleButtonComponent
        {
            get
            {
                if (_roleButtonComponent == null)
                {
                    _roleButtonComponent = new RoleButtonComponent();
                }
                return this._roleButtonComponent;
            }
            set { _roleButtonComponent = value; }
        }

        public bool RoleButton_Add(string roleKeyid, string buttonKeyid)
        {
            return this.RoleButtonComponent.RoleButton_Add(roleKeyid, buttonKeyid);
        }

        public bool RoleButton_Delete(string roleKeyid, string buttonKeyid)
        {
            return this.RoleButtonComponent.RoleButton_Delete(roleKeyid, buttonKeyid);
        }

        public List<PermissionDetails> RoleButton_GetDetailsByRoleKeyidAndPageKeyid(string roleKeyid, string pageKeyid)
        {
            return this.RoleButtonComponent.RoleButton_GetDetailsByRoleKeyidAndPageKeyid(roleKeyid, pageKeyid);
        }
    }
}
